var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
    entry: {
        index: __dirname + "/app/index.js",
        updata: __dirname+ "/app/updata.js"
    },
    output: {
        path: __dirname + "/public/",
        filename: '[name].bundle.js'
    },
    module: {
        loaders: [{
            test: /\.css$/,
            loader: ExtractTextPlugin.extract("style-loader", "css-loader")
        }, {
            test: /\.(png|jpg)$/,
            loader: 'url-loader',
            query: {
                limit: 8192,
                name: "/images/[name].[ext]"
            }
        }, {
            test: /\.js$/,
            exclude: /node_modules/,
            loader: 'babel'
        }, ]
    },
    plugins: [
        new ExtractTextPlugin("css/[name].bundle.css")
    ]
}
